<?php

namespace App\Trip\Plane\Rules;

use App\Trip\Plane\Requests\RulesRequest;
use App\Trip\Plane\Rules\Interfaces\Rules;
use Exception;

class SystemRules extends Rules
{

    private SystemLuggageRule $luggage;
    private SystemChangeRule  $change;
    private SystemRefundRule  $refund;

    /**
     * @throws Exception
     */
    public function __construct(RulesRequest $request)
    {
        $this->luggage = new SystemLuggageRule($request);
        $this->change  = new SystemChangeRule($request);
        $this->refund  = new SystemRefundRule($request);
    }

    public function getChangeRules(): array
    {
        return $this->change->getChangeRules();
    }

    public function getChangeRuleDescription(): string
    {
        return $this->change->getChangeRuleDescription();
    }

    public function getChangeRuleDescriptionUy(): string
    {
        return $this->change->getChangeRuleDescriptionUy();
    }

    public function canModify(): bool
    {
        return $this->change->canModify();
    }

    public function getLuggageRemark(): string
    {
        return $this->luggage->getLuggageRemark();
    }

    public function getLuggageRemarkUy(): string
    {
        return $this->luggage->getLuggageRemarkUy();
    }

    public function getLuggageDetails(): array
    {
        return $this->luggage->getLuggageDetails();
    }

    public function getRefundRules(): array
    {
        return $this->refund->getRefundRules();
    }

    public function getRefundRuleDescription(): string
    {
        return $this->refund->getRefundRuleDescription();
    }

    public function getRefundRuleDescriptionUy(): string
    {
        return $this->refund->getRefundRuleDescriptionUy();
    }
}